package com.rw.car.controller;

import com.rw.car.service.CarInfoService;

import com.rw.common.pojo.EsCarInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("info")
public class CarInfoController {

    @Autowired
    private CarInfoService carInfoService;

    @RequestMapping("list")
    public Map<String, Object> getInfoBy(EsCarInfo carInfo){
        Map<String, Object> map =new HashMap<>();
        List<EsCarInfo> esBy = carInfoService.findEsBy(carInfo);
        map.put("code",0);
        map.put("msg","");
        map.put("data",esBy);
        return map;
    }

}
